package com.sanyang.pda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sanyang.pda.bean.ManualOutboundDetailBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;
import com.wangshen.projectbase.R;

import java.util.List;

public class ManualOutBoundDetailAdapter extends BaseAdapter<ManualOutboundDetailBean> {
    public ManualOutBoundDetailAdapter(int layoutResId, @Nullable List<ManualOutboundDetailBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ManualOutboundDetailBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_title,item.getArticleName());
        helper.setText(R.id.tv_storage_location,item.getStoragebinId());
        helper.setText(R.id.tv_amount,item.getNum()+"");
        if (item.getStatus() == 20){
            helper.setText(R.id.tv_state,getContext().getResources().getString(R.string.have_outbound));
        }else {
            helper.setText(R.id.tv_state,getContext().getResources().getString(R.string.for_outbound));
        }
    }
}
